{% extends 'base.html' %}
{% from 'bootstrap/table.html' import render_table %}

{% block content %}
<h2>Simple Table</h2>
<pre>{% raw %}{{ render_table(messages) }}{% endraw %}</pre>
{{ render_table(messages) }}

<h2>Cutomized Table</h2>
<pre>{% raw %}{{ render_table(messages, titles, table_classes='table-striped', header_classes='thead-dark', caption='Messages') }}{% endraw %}</pre>
{{ render_table(messages, titles, table_classes='table-striped', header_classes='thead-dark', caption='Messages') }}

<h2>Responsive Table</h2>
<pre>{% raw %}{{ render_table(messages, responsive=True, responsive_class='table-responsive-sm') }}{% endraw %}</pre>
{{ render_table(messages, responsive=True, responsive_class='table-responsive-sm') }}

<h2>Table with actions</h2>
<pre>{% raw %}{{ render_table(messages, show_actions=True,
                view_url=url_for('view_message', message_id=':id'),
                edit_url=url_for('edit_message', message_id=':id'),
                delete_url=url_for('delete_message', message_id=':id')
                new_url=url_for('new_message')) }}{% endraw %}</pre>
{{ render_table(messages, show_actions=True,
                view_url=url_for('view_message', message_id=':id'),
                edit_url=url_for('edit_message', message_id=':id'),
                delete_url=url_for('delete_message', message_id=':id'),
                new_url=url_for('new_message')) }}
{% endblock %}
